import instance from "@/request/request";

// 文件上传
interface IUploadFile {
  code: number;
  message: string;
  data: Data;
}

interface Data {
  url: string;
  name: string;
}
const minioUpload = (file: any): Promise<IUploadFile> => {
    return instance.post("/minio/upload", file, {
        headers: { "Content-Type": "multipart/form-data" },
    });
};

export { minioUpload };